<?php
/**
 * 语言类
 **/
 class lang extends base{

	private static $_lang = array();

	public static function get($str){

		$parts	= explode('/',trim($str,'/'));
		$pack	= array_shift($parts);
		self::_load($pack);
		$lang = self::$_lang[$pack];
		foreach($parts as $v){
			$lang = $lang[$v];
		}
		return $lang;
	}

	private static function _load($pack){
		if(isset(self::$_lang[$pack])){
			return;
		}
		self::$_lang[$pack] = include LANG_DIR.$pack.'.lang.php';
	}
 }
?>